package com.example.vv.service.impl;

import com.example.vv.domain.TxA;
import com.example.vv.service.TxAService;
import com.example.vv.service.TxBService;
import com.github.dreamroute.mybatis.pro.service.service.AbstractServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 描述：// TODO
 *
 * @author w.dehai.2024/7/19.10:39
 */
@Service
@RequiredArgsConstructor
public class TxAServiceImpl extends AbstractServiceImpl<TxA, Long> implements TxAService {

    private final TxBService txBService;

    @Override
    @Transactional
    public void save() {
        TxA txA = new TxA();
        txA.setName("txa");
        this.insert(txA);

        txBService.save();
        throw new RuntimeException();
    }
}
